var webpack = require("webpack");
var uglifyJsPlugin = webpack.optimize.UglifyJsPlugin;

module.exports = {
    entry: {
        new:"./src/js/new.jsx",
        coupon:"./src/js/coupon.jsx"
    },
    output: {
        filename: '[name].js',
        publicPath:"/js"
    },
    module: {
        loaders: [
            {
                test: /\.js[x]?$/,
                exclude: /node_modules/,
                loader: 'babel-loader',
                query: {
                    presets: ['es2015', 'react']
                }
            },
        ]
    },
    plugins: [
        new webpack.ProvidePlugin({
            $:"jquery",
            React: "react",
            ReactDOM: "react-dom",
        }),
        // new uglifyJsPlugin({
        //     compress: {
        //         warnings: false
        //     }
        // })
    ],
    resolve: {
        extensions: ['.js', '.jsx', '.json'],
        alias: {

        }
    }
};